import com.git.groovy.service.HelloService
import com.git.groovy.service.ITestService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

/**
 * @Service 不会注入Spring上下文中
 */
public class TestGroovyService implements ITestService{


    @Autowired
    HelloService helloService;

    @Override
    String sayHello(String str) {
        println str;
        return "HI " + str;
    }

    @Override
    String sayHelloTestSpring(String str) {
        println str;
        String res = helloService.sayHello(str);
        println(str);
        return "HI " + str;
    }
}
